package com.zqh.useraddrquery.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zqh.myfmmall.result.Result;
import com.zqh.myfmmall.entity.UserAddr;
import com.zqh.useraddrquery.dao.AddrDao;
import com.zqh.useraddrquery.service.AddrQueryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-18 2:19
 */
@Service("addrQueryService")
public class AddrQueryServiceImpl extends ServiceImpl<AddrDao,UserAddr> implements AddrQueryService{

    @Override
    public Result getByUserId(String userId) {
        List<UserAddr> userAddrs = query().eq("user_id", userId).list();
        return Result.success(userAddrs);
    }
}
